Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@hebcal/rest-api
Advanced tools
Jewish holidays and Hebrew calendar as plain JSON objects and CSV export
Jewish holidays and Hebrew calendar as plain JSON objects, RSS, and CSV export
$ npm install @hebcal/rest-api
import {HebrewCalendar, Location} from '@hebcal/core';
import {eventsToClassicApi, eventsToCsv} from '@hebcal/rest-api';
const options = {
year: 2020,
month: 2,
sedrot: true,
candlelighting: true,
location: Location.lookup('Hawaii'),
};
const events = HebrewCalendar.calendar(options);
const apiResult = eventsToClassicApi(events, options);
console.log(JSON.stringify(apiResult));
const csv = eventsToCsv(events, options);
console.log(JSON.stringify(csv));
Intl.DateTimeFormat
string
number
string
Helper function to transform a string to make it more usable in a URL or filename. Converts to lowercase and replaces non-word characters with hyphen ('-').
string
string
string
string
Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
string
Returns just the date portion as YYYY-MM-DD
string
Returns a string like "2018-09-01T12:30:00-05:00'"
Array.<string>
Returns a category and subcategory name
string
Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
string
Returns an English language description of the holiday
string
Makes mulit-line text that summarizes Torah & Haftarah
string
Renders an Event as a string
string
Object
Formats a list events for the classic Hebcal.com JSON API response
Object
Converts a Hebcal event to a classic Hebcal.com JSON API object
Object
Object
Array.<string>
string
string
Object
Converts a Hebcal event to a FullCalendar.io object
Intl.DateTimeFormat
Kind: global function
Param | Type |
---|---|
tzid | string |
string
Kind: global function
Param | Type |
---|---|
tzid | string |
date | Date |
number
Kind: global function
Param | Type |
---|---|
tzid | string |
date | Date |
string
Helper function to transform a string to make it more usable in a URL or filename. Converts to lowercase and replaces non-word characters with hyphen ('-').
Kind: global function
Param | Type |
---|---|
s | string |
Example
makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
string
Kind: global function
Param | Type |
---|---|
options | HebrewCalendar.Options |
string
Kind: global function
Param | Type |
---|---|
number | number |
string
Kind: global function
Param | Type |
---|---|
number | number |
string
Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
Kind: global function
Param | Type |
---|---|
tzid | string |
date | Date |
string
Returns just the date portion as YYYY-MM-DD
Kind: global function
Param | Type |
---|---|
d | Date |
string
Returns a string like "2018-09-01T12:30:00-05:00'"
Kind: global function
Param | Type | Description |
---|---|---|
date | Date | |
timeStr | string | must be formatted with only hours and minutes, like "17:12" |
tzid | string | like "America/New_York" |
Array.<string>
Returns a category and subcategory name
Kind: global function
Param | Type |
---|---|
ev | Event |
string
Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
Kind: global function
Param | Type |
---|---|
events | Array.<Event> |
options | HebrewCalendar.Options |
string
Returns an English language description of the holiday
Kind: global function
Param | Type | Default |
---|---|---|
ev | Event | |
[firstSentence] | boolean | false |
string
Makes mulit-line text that summarizes Torah & Haftarah
Kind: global function
Param | Type |
---|---|
ev | Event |
il | boolean |
string
Renders an Event as a string
Kind: global function
Param | Type |
---|---|
e | Event |
options | HebcalOptions |
string
Kind: global function
Param | Type |
---|---|
events | Array.<Event> |
options | HebcalOptions |
Object
Formats a list events for the classic Hebcal.com JSON API response
Kind: global function
Param | Type | Default |
---|---|---|
events | Array.<Event> | |
options | HebrewCalendar.Options | |
[leyning] | boolean | true |
Object
Converts a Hebcal event to a classic Hebcal.com JSON API object
Kind: global function
Param | Type | Default |
---|---|---|
ev | Event | |
options | HebrewCalendar.Options | |
[leyning] | boolean | true |
Object
Kind: global function
Param | Type |
---|---|
result | Object |
aliyot | Object |
Object
Kind: global function
Param | Type |
---|---|
reading | leyn.Leyning |
Array.<string>
Kind: global function
Param | Type |
---|---|
ev | Event |
string
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
events | Array.<Event> | ||
location | Location | ||
mainUrl | string | ||
selfUrl | string | ||
[lang] | string | "en-US" | language such as 'he' (default 'en-US') |
[evPubDate] | boolean | true | if true, use event time as pubDate (false uses lastBuildDate) |
string
Kind: global function
Param | Type |
---|---|
ev | Event |
evPubDate | boolean |
lastBuildDate | string |
dayFormat | Intl.DateTimeFormat |
location | Location |
Object
Converts a Hebcal event to a FullCalendar.io object
Kind: global function
Param | Type | Description |
---|---|---|
ev | Event | |
tzid | string | timeZone identifier |
il | boolean | true if Israel |
FAQs
Jewish holidays and Hebrew calendar as plain JSON objects and CSV export
The npm package @hebcal/rest-api receives a total of 348 weekly downloads. As such, @hebcal/rest-api popularity was classified as not popular.
We found that @hebcal/rest-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.